<%@ page contentType="text/html;charset=UTF-8" %> 
<%@ include file="/include.inc.jsp"%>
<!DOCTYPE html>
<html>
<head>
<%@include file="/WEB-INF/views/layout/base.ref.jsp"%>
</head>
<body>
    <%@include file="/WEB-INF/views/login/home/toolbar.jsp"%>
       <div class="mtcontent">
		<div class="mtheader">
		<shiro:hasPermission name="sysRole:add">
			<a class="mtbtn one" href="#" onclick="hrefNew_OnClick('${ctx}/sysRole/edit?id=-1')"><span><i
					class="mtfa mt-add"></i>添加</span></a>
					</shiro:hasPermission>
            <shiro:hasPermission name="sysRole:del">
					 <a class="mtbtn two" href="#" onclick="bootstrapDel_OnClick('${ctx}/sysRole/del')"
				title="确定要删除吗?"> <i class="mtfa mt-del"></i><span>删除</span></a>
				 </shiro:hasPermission>
		</div>
		<div class="mtbody">
			<div class="space-4"></div>
			<form method="post" id="pagerForm" action="${ctx}/sysRole/list">
				<input type="hidden" name="ifSession" value="1" /> <input type="hidden" name="pageNum" value="1" /> <input
					type="hidden" name="pageSize" value="${vo.pageSize}" /> <input type="hidden" name="orderField"
					value="${param.orderField}" /> <input type="hidden" name="orderDirection" value="${param.orderDirection}" />
				<div class="mtrow">
					<div class="mtcolall">
						<label class="mtlabel-auto">角色名称：</label> <input type="text" class="mtinput" name="arg" value="${vo.arg}" />
						<a class="mtbtn search marginleft" href="#" onclick="queryClick('pagerForm')"><i class="mtfa mt-search"></i><span>查询</span></a>
					</div>
				</div>
			</form>

			<div class="space-4"></div>
			<table id="grid">
			</table>
		</div>
	</div>
</body>
</html>
<script type="text/javascript">
    $(function () {
        $('#grid').bootstrapTable({
            striped: true,                      //是否显示行间隔色
            pagination: true,                   //是否显示分页（*）
            sortable: true,                     //是否启用排序
            clickToSelect: true,                //是否启用点击选中行
            height: $(window).height() - 200,  //固定高度
            columns: [
            { title: '选择', field: 'check',checkbox:true, align: 'center', valign: 'middle'},
            {
                title: '操作', field: 'id', checkbox: false, align: 'center', valign: 'middle', width: 80,
                formatter: function (value, row, index) {
                    return '<a href="#" onclick="hrefNew_OnClick(\'${ctx}/sysRole/edit?id='+value +'\')"><i class="mtfa mt-pen mtblue mtpointer"></i></a>';
                }
            },
            { title: '角色名称', field: 'roleName', align: 'center', valign: 'middle', sortable: true },
            { title: '备注', field: 'remark', align: 'center', valign: 'middle', sortable: true },
            { title: '显示顺序', field: 'showOrder', align: 'center', valign: 'middle', sortable: true }],
            data:${sysRolelist}
        });
    });
</script>